package com.example.pages;

import java.util.List;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

public class MoviListPage extends InternalPage {

	@FindBy(css = ".movie_box")
	public List <WebElement> moviBox;

    public void goToMoviPage(String moviName) {
	  	  for (WebElement row : moviBox) 
	        //if not (moviBox.isEmpty()) 
	        {
	  		row.findElement(By.linkText(moviName)).click();
	  				//.className("title").name(moviName)).click();
	          //row.findElement(By.name(moviName)).click();
//    	          wait_().until(alertIsPresent()).accept();
	        break;
	        }
    }
 
}

	

